package com.controller.user.request;

import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

/**
 * Created by dawn on 2017/11/9.
 */
public class UserRequest {

    @NotBlank(message = "name cannot be null")
    private String name;

    @NotBlank(message = "password cannot be null")
    private String password;

    @NotNull(message = "departmentId cannot be null")
    private int departmentId;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public int getDepartmentId() {return departmentId;}

    public void setDepartmentId(int departmentId) {this.departmentId = departmentId;}
}
